<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>11-兄弟节点</title>
	</head>
	<body>
		<span>新浪</span>
		<div>百度</div>
		<p>阿里</p>
		<script type="text/javascript">
			var baidu = document.querySelector('div');
			//获取它的上一个兄弟
			var prev = baidu.previousElementSibling;
			var next = baidu.nextElementSibling;
			
			console.log(prev);
			console.log(next);
			
			
		</script>
		
		
	</body>
</html>
